import Vue from "vue";
import VueRouter from "vue-router";
import Home from '@/components/Home.vue'
import User from '@/components/User.vue'
import Login from '@/components/Login.vue'
import Register from '@/components/Register.vue'
import Course from '@/components/Course.vue'
import CourseDetail from '@/components/CourseDetail.vue'
import Cart from '@/components/Cart.vue'
import Order from '@/components/Order.vue'
import Success from '@/components/Success.vue'
import UserOrder from '@/components/UserOrder.vue'

Vue.use(VueRouter);

export default new VueRouter({
    mode:'history',
    routes:[
        {
            path:'/',
            component:Home
        },
        {
            path:'/home',
            component:Home
        },
        {
            path:'/login',
            component:Login
        },
        {
            path:'/register',
            component:Register
        },
        {
            path:'/course',
            component:Course
        },
        {
            path:'/coursedetail/:id/',
            component:CourseDetail
        },
        {
            path: '/cart',
            name: 'Cart',
            component: Cart,
        },
        {
            path: '/order',
            name: 'Order',
            component: Order,
        },
        {
            path: '/payments/result',
            name: 'Success',
            component: Success,
        },
        {
            path: '/userorder',
            name: 'UserOrder',
            component: UserOrder,
        },
        {
            path:'/user',
            component:User
        }

    ]

})

